package com.ljq.cls_and_obj;

import java.util.Random;

/**
 * Description:
 * Author:ljq
 * Date:2025-02-16
 * Time:0:22
 */
public class Test02 {
    public static void main(String[] args) {
        System.out.println(getRandomNum());
        System.out.println(getRandomNum2());
    }

    public static int getRandomNum() {

        Random random = new Random();
        int n = random.nextInt(100) + 1;
        return n;
    }

    public static int getRandomNum2() {

        int n = (int) (Math.random() * 100) + 1;
        return n;
    }
}
